<template>
    <div style="display: inline-block;">
       <div class="actor-item">
         <el-avatar shape='square' fit='cover' :size='80' :src='src'></el-avatar>
         <p>{{name}}</p>
         <i class="el-icon-error" @click="deleteActor()"></i>
       </div>
    </div>
</template>

<script>
    export default {
        props:['name','src'],
        methods: {
            deleteActor() {
            this.$emit('delete')
            }
        },
    }
</script>

<style scoped>
.actor-item{
    display: inline-block;
    margin: 20px 20px 0px 0px;
    text-align: center;
    position: relative;
  }
  p{
        margin: 0px;
        font-size: 0.8em;
    }
  .el-avatar>>>img{
    width: 100%;
  }
  i{
    font-size: 1.2em;
    position: absolute;
    top: -9px;
    right: -9px;
    display: none;
  }
  .actor-item:hover i{
    display: block;
  }
</style>